class ShortInputExcetption(Exception):
	'''A user-defined exception class.'''
	def __init__(self, length, atleast):
		Exception.__init__(self)
		self.length = length
		self.atleast = atleast

try:
	s = raw_input("Enter something:")
	if len(s) < 3:
		raise ShortInputExcetption(len(s), 3)
except EOFError:
	print 'Why did you do an EOF on me ?\n'
except ShortInputExcetption,x:
	print 'ShortInputExcetption: The input was of length %d,\
	was excepting at least %d\n' %(x.length,x.atleast)
else:
	print 'No exception was raised.\n'